<template>
    <span>
        <span v-if="app_id == configs.app_id">
            <span>{{ configs.app_name }}（本机）</span>
            <span style="font-size: 10px;color:#aaa;">{{ app_id }}</span>
        </span>
        <span v-else-if="appsBriefData[app_id]">
            <span>{{ appsBriefData[app_id] }}</span>
            <span style="font-size: 10px;color:#aaa;">{{ app_id }}</span>
        </span>
        <span v-else>{{ app_id }}</span>
    </span>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'AppLabel',
  props: {
    app_id: String,
  },
  computed: {
    ...mapGetters(['appsBriefData', 'configs'])
  }
}
</script>